// components/modal/index.js
Component({
    properties: {
        bgOpcity: {
            type: String,
            value: '.4'
        },
        title: {
            type: String,
            value: ''
        },
        show: {
            type: Boolean,
            value: false
        },
        footer: {
            type: Boolean,
            value: false
        },
        mask: {
            type: Boolean,
            value: false
        },
        closeIcon: {
            type: Boolean,
            value: true
        },
        bodyBg: {
            type: String,
            value: '#fff'
        },
    },
    options: {
        addGlobalClass: true
    },
    externalClasses: ['lk-class'],
    data: {},
    methods: {
        handlerClose() {
            this.setData({
                show: false
            })
            this.triggerEvent('close')
            this.triggerEvent('change', false)

        },
        handlerMaskCloseModal() {
            if (!this.data.mask) {
                return
            }
            this.setData({
                show: false
            })
            this.triggerEvent('close')
            this.triggerEvent('change', false)
        }
    }
})
